﻿using System;
using System.Security.Permissions;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Security;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.Workflow;

namespace PepsiCo.RBS.EventReceivers.EmailTemplateEventReceiver
{
    /// <summary>
    /// List Item Events
    /// </summary>
    public class EmailTemplateEventReceiver : SPItemEventReceiver
    {
       /// <summary>
       /// An item is being deleted.
       /// </summary>
       public override void ItemDeleting(SPItemEventProperties properties)
       {
           base.ItemDeleting(properties);

           properties.Cancel = true;
           properties.ErrorMessage = "You cannot delete email template.";
       }


    }
}
